const express = require('express')

const router = express.Router()


const config = require('./config')

const homeData=require('./data/home/hotdata')

const  searchData=require('./data/search/seachdata')

const detailsData=require('./data/details/detailsdata')


router.get(config.homehot1, (req, res) => {
    console.log(config.homehot1)
    res.send(homeData.hot1)
})


router.get(config.homehot2, (req, res) => {
    res.send(homeData.hot2)
})

//搜索接口 

router.get(config.search,(req,res)=>{
    res.send(searchData)
})

//商品详情接口 

router.get(config.details,(req,res)=>{
    res.send(detailsData)
})

module.exports = router